# Contributor: Alex Yam <alex@alexyam.com>
# Maintainer: Alex Yam <alex@alexyam.com>
pkgname=py3-rtree
_pkgname=rtree
pkgver=0.9.7
pkgrel=2
pkgdesc="Python3 library for r-tree spatial index (wrapper for libspatialindex)"
url="https://pypi.org/project/Rtree/"
# s390x: Test failed: IndexSerialization::test_interleaving - AssertionError
# s390x: Test failed: IndexStream::test_stream_input - AssertionError
arch="noarch !s390x"
license="MIT"
depends="python3 libspatialindex-dev"
makedepends="py3-setuptools py3-wheel"
checkdepends="py3-pytest py3-numpy"
source="$pkgname-$pkgver.tar.gz::https://github.com/Toblerity/rtree/archive/$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

build() {
	python3 setup.py build
}

check() {
	python3 -m pytest -v --doctest-modules rtree tests
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="f3add9440ddbc3b40366a3826c4206d03d46aa4e0e5cf90e5838347def7f9b52662458cb964a5f27cfd589637b2b1616dca62cbd89e6095601cf0f1881e2090b  py3-rtree-0.9.7.tar.gz"
